package org.shuker.factory.impl;

import org.shuker.pojo.Configuration;
import org.shuker.factory.SqlSessionFactory;
import org.shuker.sqlsession.SqlSession;
import org.shuker.sqlsession.impl.DefaultSqlSession;

/**
 * @author ：Shuker
 * @date ：Created in 2022/6/14 11:34
 * @description：
 * @version:
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {
    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
